using KinonekoSoftware.CodariaDB.Documents.Index;

namespace KinonekoSoftware.CodariaDB.Documents.Personalities
{
    public sealed class SurveySets : _Intro, ICloneable<SurveySets>
    {
        public SurveySets Clone()
        {
            var id = string.IsNullOrEmpty(Id) ? ID.Get() : Id;
            return new SurveySets
            {
                Id    = id,
                Items = new ObservableCollection<Survey>(Items.Select(x => x.Clone())),
                Intro = Intro,
                Name  = Name,
            };
        }

        public ObservableCollection<Survey> Items { get; set; }
    }
}